home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
SGI Enlighten DSM 1.1
/
SGI EnlightenDSM 1.1.iso
/
hp904905
/
common.z
/
common
/
bin
/
p_format
< prev
next >
Wrap
Text File
|
1998-07-01
|
2KB
|
80 lines
#!/bin/sh
#
# SID @(#)p_format.sh 1.2 - 95/10/16
#
# Copyright (c) 1990-1998 Enlighten Software Solutions, Inc.
# -- All Rights Reserved --
#
# created by: Thomas Kraus, February 8, 1994
#
if test $# -lt 2
then
echo "Usage: $0 architecture disk-device"
echo
echo "Where architecture is one of:"
echo " AIX SUN4"
echo " SOLARIS SCO"
echo " HPUX DGUX"
echo " OSF1"
exit 1
fi
case "$1" in
SOLARIS)
#
# SUN 4 and SOLARIS
#
trap "echo Procedure aborted; kill -9 0; exit 1" 1 2 3 6
if test "$1" = "SOLARIS"
then
formatcmd=/usr/sbin/format
else
formatcmd=/usr/etc/format
fi
echo
echo
echo "The disk drive $2 will now be formated and verified. All"
echo "data on the disk will be lost and the formating of the disk"
echo "cannot be interupted."
echo
echo " Do you wish to continue (y/n) ? \c"
read ans
if test "$ans" = "y" -o "$ans" = "Y"
then
echo
echo "Starting to format disk in 10 seconds. Hit Ctrl-C to abort ..."
for i in 1 2 3 4 5 6 7 8 9 0
do
echo ". \c"
sleep 1
done
echo
cmdfile=/tmp/._$$
echo format > $cmdfile
echo "Formating of disk is now beginning."
echo "The formating may take 20-40 minutes to complete ..."
$formatcmd -f $cmdfile $2
exitval=$?
echo
echo "Formating complete. To create partitions on the disk, proceed"
echo "to the Partitions screen and select the Modify button."
rm -f $cmdfile
else
exitval=1
fi
;;
esac
exit $exitval